<template>
  <div>
    <el-container class="nav_menu">
      <el-aside width="200px">
        <el-menu
          default-active="2"
          class="el-menu-vertical-demo"
          
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b"
        >
          <el-menu-item index="1">
            <i class="el-icon-menu"></i>
            <span slot="title">导航1</span>
          </el-menu-item>
          <el-menu-item index="2" disabled>
            <i class="el-icon-document"></i>
            <span slot="title">导航2</span>
          </el-menu-item>
          <el-menu-item index="3">
            <i class="el-icon-setting"></i>
            <span slot="title">导航3</span>
          </el-menu-item>
        </el-menu>
      </el-aside>

      <el-container>
        <el-header>Header</el-header>
        <el-main>Main</el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  data() {
    return {
      routerList: [],
    };
  },
  creatrd() {
    let arr = this.$router.getRoutes();
    arr.forEach((item, index) => {
      let obj = {};
      if (item.meta.label) {
        obj.path = item.path;
        obj.name = item.name;
        obj.label = item.meta.lobel;
      }
      this.routerList.push(obj)
    });
    this.routerList=arr;
    constole.log(this.$router.getRoutes());
  },
};
</script>

<style lang="scss">
.el-header,
.el-footer {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #d3dce6;
  color: #333;
  text-align: center;
  line-height: 200px;
}

.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  line-height: 160px;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}

.el-menu-vertical-demo {
  height: 100%;
}
.el_header_box {
  border-bottom: 1px solid #ccc;
}
* {
  margin: 0;
  padding: 0;
  list-style: none;
}
#app {
  width: 100vh;
  height: 100%;
}

.el-icon-location {
  height: 100%;
}
.nav_menu {
  height: 100vh;
}
</style>
